package  
{
	import net.flashpunk.Entity;
	import net.flashpunk.World;
	import net.flashpunk.FP;
	import net.flashpunk.utils.Input;
	import net.flashpunk.utils.Key;
	import net.flashpunk.graphics.Image;
	/**
	 * © 2012 TheJavaArcade.com
	 */	
	public class TitleWorld extends World {
		
		public var pressZDialogue:Dialogue = new Dialogue();
		public var titleImage:Image = new Image(Assets.TITLE);
		public var background:Entity = new Entity(0, 0, titleImage);
		
		public function TitleWorld() {
			//FP.console.enable();
			add(background);
			add(pressZDialogue);
			pressZDialogue.theText.text = "Press Z to Play";
			pressZDialogue.theText.align = "center";
			pressZDialogue.x = FP.halfWidth / 2 - (pressZDialogue.theText.width / 2);
			pressZDialogue.y = 200;
		}
		
		override public function update():void {
		//	super();
			if (Input.pressed(Key.Z)) {
				FP.world = new GameEngine;
			}
		}

	}

}